<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<base target="_self" />
<link href="../Styles/css.css" rel="stylesheet" type="text/css" />
<link href="../Styles/ts_css.css" rel="stylesheet" type="text/css" />
<script src="../Scripts/My97DatePicker/WdatePicker.js"
	type="text/javascript"></script>
<script src="../Scripts/selectProject.js" type="text/javascript"></script>
<script src="../Scripts/IndexManager.js" type="text/javascript"></script>
<!-- 日期插件，使用jquery -->
<script type="text/javascript" src="../jquery/jquery-1.4.2.js"></script>
<link rel="stylesheet" href="../jquery/jquery.datepick.css"
	type="text/css">
<script type="text/javascript" src="../jquery/jquery.datepick.js"></script>
<script type="text/javascript" src="../jquery/jquery.datepick-zh-CN.js"></script>
<script type="text/javascript">
        function page_Close() {
         /*    if (window.parent != null) {
                window.parent.close();
            }
            else {
                window.close();
            } */
            location.href="/wanda/room/selectAll.do";
        }
       /*  //ajax通过项目id获取楼栋
        $(function(){
        	$('#projectId').change(function(){
        		var projectId = $('#projectId').val();
        		//alert(projectId);
        		$.ajax({
        			url:"/wanda/unit/getBuild.do",
        			type:"post",
        			dataType:"json",
        			data:{"projectId":projectId},
        			success:function(data){
        				//alert(data);
        				$('#buildId').empty();
        				 $("#buildId").append("<option value=''>----选择楼栋----</option>");
        				   $.each(data.tasks,function(index,item){
        					 $("#buildId").append( "<option value='"+item.buildId+"'>"+item.buildName+"</option>");
        		            });
        			}
        		});
        	});
        	
        	
        	$('#buildId').change(function(){
        		var buildId = $('#buildId').val();
        		//alert(projectId);
        		
        		$.ajax({
        			url:"/wanda/room/getUnit.do",
        			type:"post",
        			dataType:"json",
        			data:{"buildId":buildId},
        			success:function(data){
        				//alert(data);
        				$('#unitId').empty();
        				 $("#unitId").append("<option value=''>----选择单元----</option>");
        				   $.each(data.tasks,function(index,item){
        					 $("#unitId").append( "<option value='"+item.unitId+"'>"+item.unitCode+"</option>");
        		            });
        			}
        		});
        	});
        	
        }); */
        
        //ajax通过楼栋id获取单元
       
    </script>
</head>
<body>
	<form method="post" action="/wanda/room/Wd_ht_room_update.do"
		id="form1">



		<div id="divTwo">
			<table width="100%" border="0" cellpadding="2" cellspacing="2"
				class="table_list1">
				<tr>
					<input name="roomId" type="hidden" value="${bean.roomId }"
						id="roomId" />
				</tr>
				<tr>
					<td width="15%" class="table_list1_style1"><span
						style="color: Red">*</span> 所属项目</td>
					<td width="35%" class="table_list1_style2">
						<!-- <input name="projectName" type="text" value="" id="projectName" /> -->
						<%-- <select name="projectId" id="projectId" >
                         <option value="">--选择所属项目--</option>
                        <c:forEach var="bean" items="${Wd_ht_projectList }">
                           <option value="${bean.projectId }">${bean.projectName }</option>
                        </c:forEach>
                    </select> --%> <input name="" type="text"
						disabled="disabled" value="${bean.wd_ht_project.projectName }"
						id="projectName" /> <span id="RequiredFieldValidator8"
						style="display: none;">不能为空</span>
					</td>
					<span id="RequiredFieldValidator8" style="display: none;">不能为空</span>
					</td>
				</tr>
				<tr>
					<td class="table_list1_style1"><span style="color: Red">*</span>
						所属楼栋</td>
					<td class="table_list1_style2">
						<!-- <input name="startTime" type="text" value="" id="startTime"
                        onfocus="WdatePicker({ readOnly: true,skin:&#39;whyGreen&#39;,dateFmt:&#39;HH:mm&#39;})" />
                    <span id="RequiredFieldValidator9" style="display: none;">不能为空</span> -->
						<!--  <select name="buildId" id="buildId" >
                         <option value="">--选择所属楼栋--</option>
                    
                    </select> --> <input name="" type="text"
						disabled="disabled" value="${bean.wd_ht_build.buildName}"
						id="buildId"
						onfocus="WdatePicker({ readOnly: true,skin:&#39;whyGreen&#39;,dateFmt:&#39;HH:mm&#39;})" />
					</td>

				</tr>

				<tr>
					<td class="table_list1_style1"><span style="color: Red">*</span>
						所属单元</td>
					<td class="table_list1_style2">
						<!-- <input name="startTime" type="text" value="" id="startTime"
                        onfocus="WdatePicker({ readOnly: true,skin:&#39;whyGreen&#39;,dateFmt:&#39;HH:mm&#39;})" />
                    <span id="RequiredFieldValidator9" style="display: none;">不能为空</span> -->
						<!-- <select name="unitId" id="unitId" >
                         <option value="">--选择所属单元--</option>
                    
                    </select> --> <input name="" type="text"
						disabled="disabled" value="${bean.wd_ht_unit.unitCode}"
						id="buildId"
						onfocus="WdatePicker({ readOnly: true,skin:&#39;whyGreen&#39;,dateFmt:&#39;HH:mm&#39;})" />
					</td>

				</tr>

				<tr>
					<td class="table_list1_style1"><span style="color: Red">*</span>
						所属户型</td>
					<td class="table_list1_style2">
						<!-- <input name="startTime" type="text" value="" id="startTime"
                        onfocus="WdatePicker({ readOnly: true,skin:&#39;whyGreen&#39;,dateFmt:&#39;HH:mm&#39;})" />
                    <span id="RequiredFieldValidator9" style="display: none;">不能为空</span> -->
						<select name="apartmentLayoutId" id="apartmentLayoutId">
							<option value="">--选择所属户型--</option>
							<c:forEach var="bean1" items="${Wd_apartment_layoutList }">
								<c:choose>
									<c:when test="${ bean.apartmentLayoutId == bean1.apartmentLayoutId }">
										<option value="${ bean.apartmentLayoutId }" selected>${ bean.wd_apartment_layout.apartmentLayout }</option>
									</c:when>
									<c:otherwise>
										<option value="${bean1.apartmentLayoutId }">${bean1.apartmentLayout  }</option>
									</c:otherwise>
								</c:choose>>
                                
							</c:forEach>
					</select>
					</td>

				</tr>

				<tr>
					<td class="table_list1_style1"><span style="color: Red">*</span>
						所属用途</td>
					<td class="table_list1_style2">
						<!-- <input name="startTime" type="text" value="" id="startTime"
                        onfocus="WdatePicker({ readOnly: true,skin:&#39;whyGreen&#39;,dateFmt:&#39;HH:mm&#39;})" />
                    <span id="RequiredFieldValidator9" style="display: none;">不能为空</span> -->
						<select name="purposeId" id="purposeId">
							<option value="">--选择所属用途--</option>
							<c:forEach var="bean1" items="${Wd_purposeList }">
                             <c:choose>
									<c:when test="${ bean.purposeId == bean1.purposeId }">
										<option value="${ bean.purposeId }" selected>${ bean.wd_purpose.purpose }</option>
									</c:when>
									<c:otherwise>
										<option value="${bean1.purposeId }">${bean1.purpose }</option>
									</c:otherwise>
								</c:choose>>
                             
                           </c:forEach>
					</select>
					</td>

				</tr>
				<tr>
					<td class="table_list1_style1"><span style="color: Red">*</span>
						房间房号</td>
					<td class="table_list1_style2"><input name="roomCode"
						type="text" value="${bean.roomCode }" id="roomCode"
						onfocus="WdatePicker({ readOnly: true,skin:&#39;whyGreen&#39;,dateFmt:&#39;HH:mm&#39;})" />
						<span id="RequiredFieldValidator2" style="display: none;">不能为空</span>
					</td>
					<!-- <td class="ta_01" bgColor="#ffffff">
						<input type="text" name="endTime" size="20" value="" readonly="readonly" id="endTime"/>
					</td> -->
				</tr>
				<tr>
					<td class="table_list1_style1"><span style="color: Red">*</span>
						实际面积</td>
					<td class="table_list1_style2"><input name="buildUpArea"
						type="text" value="${bean.buildUpArea }" id="buildUpArea"
						onfocus="WdatePicker({ readOnly: true,skin:&#39;whyGreen&#39;,dateFmt:&#39;H:mm&#39;})" />
						<span id="RequiredFieldValidator4" style="display: none;">不能为空</span>
					</td>
				</tr>

				<tr>
					<td class="table_list1_style1"><span style="color: Red">*</span>
						可用面积</td>
					<td class="table_list1_style2"><input name="innerArea"
						type="text" value="${bean.innerArea }" id="innerArea"
						onfocus="WdatePicker({ readOnly: true,skin:&#39;whyGreen&#39;,dateFmt:&#39;H:mm&#39;})" />
						<span id="RequiredFieldValidator4" style="display: none;">不能为空</span>
					</td>
				</tr>

				<tr>
					<td class="table_list1_style1"><span style="color: Red">*</span>
						套内面积单价</td>
					<td class="table_list1_style2"><input name="innerPrice"
						type="text" value="${bean.innerPrice }" id="innerPrice"
						onfocus="WdatePicker({ readOnly: true,skin:&#39;whyGreen&#39;,dateFmt:&#39;H:mm&#39;})" />
						<span id="RequiredFieldValidator4" style="display: none;">不能为空</span>
					</td>
				</tr>

				<tr>
					<td class="table_list1_style1"><span style="color: Red">*</span>
						建筑面积单价</td>
					<td class="table_list1_style2"><input name="unitPrice"
						type="text" value="${bean.unitPrice }" id="unitPrice"
						onfocus="WdatePicker({ readOnly: true,skin:&#39;whyGreen&#39;,dateFmt:&#39;H:mm&#39;})" />
						<span id="RequiredFieldValidator4" style="display: none;">不能为空</span>
					</td>
				</tr>
				<tr>
					<td class="table_list1_style1"><span style="color: Red">*</span>
						楼层</td>
					<td class="table_list1_style2"><input name="floor" type="text"
						value="${bean.floor }" id="floor"
						onfocus="WdatePicker({ readOnly: true,skin:&#39;whyGreen&#39;,dateFmt:&#39;H:mm&#39;})" />
						<span id="RequiredFieldValidator4" style="display: none;">不能为空</span>
					</td>
				</tr>
				<tr id="isVisible">
					<td class="table_list1_style1"><span style="color: Red">*</span>
						房间状态</td>
					<td class="table_list1_style2"><input name="state" type="text"
						value="${bean.state }" id="state"
						onfocus="WdatePicker({ readOnly: true,skin:&#39;whyGreen&#39;,dateFmt:&#39;H:mm&#39;})" />
						<span id="RequiredFieldValidator6" style="display: none;">不能为空</span>
					</td>
				</tr>
				<tr>
					<td class="table_list1_style1">&nbsp;</td>
					<td class="table_list1_style2">
						<!--  <input type="button" name="btnUpdate" value="修改" id="btnUpdate" tabindex="1" class="button" /> -->
						<input type="submit" name="btnUpdate" value="修改" id="btnUpdate"
						tabindex="1" class="button" /> &nbsp;&nbsp; <input id="btnBack"
						type="button" class="button" value="关闭" onclick="page_Close()" />
					</td>
				</tr>
			</table>
		</div>
		<!--  <input type="hidden" name="hidUuid" id="hidUuid" value="039809E6DDCD496798BF5F24E0AD6EB9" />
    <input type="hidden" name="hidProductId" id="hidProductId" value="103872" /> -->
		<script type="text/javascript"> 
//<![CDATA[
        var Page_Validators = new Array(document.getElementById("RequiredFieldValidator8"), document.getElementById("RequiredFieldValidator9"), document.getElementById("RequiredFieldValidator2"), document.getElementById("RequiredFieldValidator4"), document.getElementById("RequiredFieldValidator6"));
//]]>
    </script>
		<script type="text/javascript"> 
//<![CDATA[
        var RequiredFieldValidator8 = document.all ? document.all["RequiredFieldValidator8"] : document.getElementById("RequiredFieldValidator8");
        RequiredFieldValidator8.controltovalidate = "txtRespectivePro";
        RequiredFieldValidator8.errormessage = "不能为空";
        RequiredFieldValidator8.display = "Dynamic";
        RequiredFieldValidator8.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
        RequiredFieldValidator8.initialvalue = "";
        var RequiredFieldValidator9 = document.all ? document.all["RequiredFieldValidator9"] : document.getElementById("RequiredFieldValidator9");
        RequiredFieldValidator9.controltovalidate = "txtMorningBeginTime";
        RequiredFieldValidator9.errormessage = "不能为空";
        RequiredFieldValidator9.display = "Dynamic";
        RequiredFieldValidator9.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
        RequiredFieldValidator9.initialvalue = "";
        var RequiredFieldValidator2 = document.all ? document.all["RequiredFieldValidator2"] : document.getElementById("RequiredFieldValidator2");
        RequiredFieldValidator2.controltovalidate = "txtMorningEndTime";
        RequiredFieldValidator2.errormessage = "不能为空";
        RequiredFieldValidator2.display = "Dynamic";
        RequiredFieldValidator2.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
        RequiredFieldValidator2.initialvalue = "";
        var RequiredFieldValidator4 = document.all ? document.all["RequiredFieldValidator4"] : document.getElementById("RequiredFieldValidator4");
        RequiredFieldValidator4.controltovalidate = "txtAfternoonBeginTime";
        RequiredFieldValidator4.errormessage = "不能为空";
        RequiredFieldValidator4.display = "Dynamic";
        RequiredFieldValidator4.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
        RequiredFieldValidator4.initialvalue = "";
        var RequiredFieldValidator6 = document.all ? document.all["RequiredFieldValidator6"] : document.getElementById("RequiredFieldValidator6");
        RequiredFieldValidator6.controltovalidate = "txtAfternoonEndTime";
        RequiredFieldValidator6.errormessage = "不能为空";
        RequiredFieldValidator6.display = "Dynamic";
        RequiredFieldValidator6.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
        RequiredFieldValidator6.initialvalue = "";
//]]>
    </script>
		<script type="text/javascript"> 
//<![CDATA[

        var Page_ValidationActive = false;
        if (typeof (ValidatorOnLoad) == "function") {
            ValidatorOnLoad();
        }

        function ValidatorOnSubmit() {
            if (Page_ValidationActive) {
                return ValidatorCommonOnSubmit();
            }
            else {
                return true;
            }
        }
        //]]>
        
        $(document).ready(function(){
			//使用class属性处理  'yy-mm-dd' 设置格式"yyyy/mm/dd"
			//$('#startTime').datepick({dateFormat: 'yy-mm-dd'}); 
			//$('#endTime').datepick({dateFormat: 'yy-mm-dd'}); 
		});
    </script>
	</form>
</body>
</html>
